/**
 * 
 */
package com.jbarreto;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author 814168
 *
 */
public class SpringHelloWorldConfigTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		//Initialize IoC Container

		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(SpringHelloWorldConfig.class);

		System.out.println("Calling Bean method: sayHello()");

		//Retrieve the bean from Container

		SpringHelloWorld myBean = (SpringHelloWorld) context.getBean("springHelloWorld");

		myBean.sayHello();
	}

}
